﻿// See https://aka.ms/new-console-template for more information

using 更多的数据结构;

Console.WriteLine("Hello, World!");

// 姓名 - 学号
//Dictionary<string, string> idDic = new Dictionary<string, string>();

// 姓名 - 班级
//Dictionary<string, string> classDic = new Dictionary<string, string>();

Student student = new Student("iOS Club 2");
// 枚举类型 -> int 相对应的
student.type = Enum.Parse<StudentType>("大学生");
student.id = "001";
// 语数英
student.scores = new int[] { 100, 100, 100 };
//student.Print();

StudentClass class1 = new StudentClass("iOS Club");
class1.type = StudentType.初中生;
class1.Print();

// 结构体
struct Student
{
    public string name;
    public string id;
    public StudentType type;
    public string className;
    public int[] scores;

    public Student(string _class)
    {
        if (_class == "")
            className = "iOS Club";
        else
            className = _class;
        name = "";
        id = "";
        scores = new int[3];
        type = StudentType.大学生;
    }

    public Student(string _name, string _id, string _class, int[] _scores)
    {
        name = _name;
        id = _id;
        className = _class;
        scores = _scores;
        type = StudentType.大学生;
    }

    public void Print()
    {
        Console.WriteLine($"姓名 : {name} , 学号 : {id} , 班级 : {className} , 语数英 : {scores[0]} {scores[1]} {scores[2]} , 类型 : {type}");
    }
}